package org.example.system.service;

import org.example.system.entity.ScenicSpot;
import org.example.system.mapper.RouteSpotMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RouteSpotService {
    @Autowired
    private RouteSpotMapper routeSpotMapper;

    public List<ScenicSpot> getScenicSpotsByRouteId(Long routeId) {
        return routeSpotMapper.selectScenicSpotsByRouteId(routeId);
    }
    public int addScenicSpotToRoute(Long routeId, Long scenicSpotId) {
        return routeSpotMapper.addScenicSpotToRoute(routeId, scenicSpotId);
    }
    public int removeScenicSpotFromRoute(Long routeId, Long scenicSpotId) {
        return routeSpotMapper.removeScenicSpotFromRoute(routeId, scenicSpotId);
    }
} 